from django.db import models

# Create your models here.
class factory_env_data(models.Model):
    env_name = models.CharField(max_length=255, blank=True, null=True, verbose_name='环境点', unique=True)
    data_value = models.CharField(max_length=255, blank=True, null=True, verbose_name='环境值')
    env_status = models.CharField(max_length=255, blank=True, null=True, verbose_name='环境状态')
    save_time = models.DateTimeField(blank=True, null=True,verbose_name='记录日期')

    class Meta:
        managed = True
        db_table = 'factory_env_data'
        verbose_name = '环境监控表'


class Machine_data(models.Model):
    Machine_name = models.CharField(max_length=255, blank=True, null=True, verbose_name='机台名', unique=True)
    data_value = models.CharField(max_length=255, blank=True, null=True, verbose_name='数据值')
    Machine_status = models.CharField(max_length=255, blank=True, null=True, verbose_name='机台状态')
    save_time = models.DateTimeField(blank=True, null=True,verbose_name='记录日期')
    class Meta:
        managed = True
        db_table = 'Machine_data'
        verbose_name = '机台监控表'

class Electric_power(models.Model):
    electric_name = models.CharField(max_length=255, blank=True, null=True, verbose_name='电力记录点', unique=True)
    data_value = models.CharField(max_length=255, blank=True, null=True, verbose_name='电力值')
    used_status = models.CharField(max_length=255, blank=True, null=True, verbose_name='运行状态')
    save_time = models.DateTimeField(blank=True, null=True, verbose_name='记录日期')
    class Meta:
        managed = True
        db_table = 'Electric_power'
        verbose_name = '电力监控表'


class User_Big_Data_View(models.Model):
    username = models.CharField(max_length=255, blank=True, null=True, verbose_name='大数据界面用户名', unique=True)
    password = models.CharField(max_length=255, blank=True, null=True, verbose_name='密码', unique=True)
    status = models.CharField(max_length=255, blank=True, null=True, verbose_name='状态')
    class Meta:
        managed = True
        db_table = 'User_Big_Data_View'
        verbose_name = '大数据界面用户表'